[Python] Fixing issues 5508 and 5512. Making sure profile dir path of type str un... #55
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixing issues 5508 and 5512. Making sure profile dir path of type str under both Py2 and Py3. Changing the way BytesIO imported so that str unicode swap actually happens under Py2.
Changes made:
I don't see any necessity to turn all the string literals in the file firefox_profile.py into unicode literals by importing
unicode_literals
, removing which makes sure that the profile dir path of typestr
under both Py2 and Py3. This fixes the issues 5508 and 5512 happening under Py2. A test has already been there to cover this scenario.io
module introduced in Python2.6 itself. Hence, changing the the wayBytesIO
imported so that thestr
andunicode
swap would actually happen under Py2. This fixes the issue when try setting unicode profile preference under Py2.Added 2 more firefox profile tests to make sure int and bool preferences are set properly.
EDIT: Updated the unicode preference setting test to make it functional under Py2.